import requests
# 传递URL参数
params={}
# 设置cookie
cookies={}
# 设置

# r = requests.get('http://www.imxingzhe.com/xzb/97294/')
# 传递cookie
cookies = dict(cookies_are='working')
r = requests.get('http://127.0.0.1/lgywsoft/emergence/getemergencebyid.action?id=1905241147233441bcc8dda4020cca68',
                 cookies=cookies,
                 timeout=1)
# r = requests.get('http://127.0.0.1/lgywsoft/emergence/getemeid.action' + '?id=1905241147233441bcc8dda4020cca68')

#  抛出异常 (200 则不会抛出
r.raise_for_status()

print(r.headers)
# cookies操作

print(r.cookies)
print(r.status_code)
# print(r.text)
print(r.json())

